package com.gugu.procedure.common;

import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;


@Component
public class HttpServletRequestUtils {

    public String getAccount(HttpServletRequest request) {
        String account = (String) request.getAttribute(Constant.ACCOUNT);
        return account;
    }

    public String getRole(HttpServletRequest request) {
        String role = (String) request.getAttribute(Constant.ROLE);
        return role;
    }

    public String getName(HttpServletRequest request) {
        String name = (String) request.getAttribute(Constant.NAME);
        return name;
    }

    public String getMobile(HttpServletRequest request) {
        String mobile = (String) request.getAttribute(Constant.MOBILE);
        return mobile;
    }


    public String getTime(HttpServletRequest request) {
        String time = (String) request.getAttribute(Constant.TIME);
        return time;
    }
}
